/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Attributes.ipp.zapt

#include <clusters/ColorControl/Attributes.h>

#include <app/data-model/Decode.h>
#include <app/data-model/WrappedStructEncoder.h>

namespace chip {
namespace app {
namespace Clusters {
namespace ColorControl {
namespace Attributes {
CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path)
{
    switch (path.mAttributeId)
    {
    case Attributes::CurrentHue::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, currentHue);
    case Attributes::CurrentSaturation::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, currentSaturation);
    case Attributes::RemainingTime::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, remainingTime);
    case Attributes::CurrentX::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, currentX);
    case Attributes::CurrentY::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, currentY);
    case Attributes::DriftCompensation::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, driftCompensation);
    case Attributes::CompensationText::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, compensationText);
    case Attributes::ColorTemperatureMireds::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorTemperatureMireds);
    case Attributes::ColorMode::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorMode);
    case Attributes::Options::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, options);
    case Attributes::NumberOfPrimaries::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, numberOfPrimaries);
    case Attributes::Primary1X::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary1X);
    case Attributes::Primary1Y::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary1Y);
    case Attributes::Primary1Intensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary1Intensity);
    case Attributes::Primary2X::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary2X);
    case Attributes::Primary2Y::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary2Y);
    case Attributes::Primary2Intensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary2Intensity);
    case Attributes::Primary3X::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary3X);
    case Attributes::Primary3Y::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary3Y);
    case Attributes::Primary3Intensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary3Intensity);
    case Attributes::Primary4X::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary4X);
    case Attributes::Primary4Y::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary4Y);
    case Attributes::Primary4Intensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary4Intensity);
    case Attributes::Primary5X::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary5X);
    case Attributes::Primary5Y::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary5Y);
    case Attributes::Primary5Intensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary5Intensity);
    case Attributes::Primary6X::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary6X);
    case Attributes::Primary6Y::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary6Y);
    case Attributes::Primary6Intensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, primary6Intensity);
    case Attributes::WhitePointX::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, whitePointX);
    case Attributes::WhitePointY::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, whitePointY);
    case Attributes::ColorPointRX::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointRX);
    case Attributes::ColorPointRY::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointRY);
    case Attributes::ColorPointRIntensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointRIntensity);
    case Attributes::ColorPointGX::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointGX);
    case Attributes::ColorPointGY::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointGY);
    case Attributes::ColorPointGIntensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointGIntensity);
    case Attributes::ColorPointBX::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointBX);
    case Attributes::ColorPointBY::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointBY);
    case Attributes::ColorPointBIntensity::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorPointBIntensity);
    case Attributes::EnhancedCurrentHue::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, enhancedCurrentHue);
    case Attributes::EnhancedColorMode::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, enhancedColorMode);
    case Attributes::ColorLoopActive::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorLoopActive);
    case Attributes::ColorLoopDirection::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorLoopDirection);
    case Attributes::ColorLoopTime::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorLoopTime);
    case Attributes::ColorLoopStartEnhancedHue::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorLoopStartEnhancedHue);
    case Attributes::ColorLoopStoredEnhancedHue::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorLoopStoredEnhancedHue);
    case Attributes::ColorCapabilities::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorCapabilities);
    case Attributes::ColorTempPhysicalMinMireds::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorTempPhysicalMinMireds);
    case Attributes::ColorTempPhysicalMaxMireds::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, colorTempPhysicalMaxMireds);
    case Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, coupleColorTempToLevelMinMireds);
    case Attributes::StartUpColorTemperatureMireds::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, startUpColorTemperatureMireds);
    case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, generatedCommandList);
    case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, acceptedCommandList);
    case Attributes::AttributeList::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, attributeList);
    case Attributes::FeatureMap::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, featureMap);
    case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
        return DataModel::Decode(reader, clusterRevision);
    default:
        return CHIP_NO_ERROR;
    }
}
} // namespace Attributes
} // namespace ColorControl
} // namespace Clusters
} // namespace app
} // namespace chip
